<?php $this->load->view("common/page_header");?>
<div id="body_main">
	<div id="admin_header">
		<div class="top_cleft">
			<ul>
				<li class="current"><a href="###">小组管理</a></li>
				<li><a href="/group/view?group_id=<?php echo $group_id;?>">小组首页</a></li>
			</ul>
			<div class="clear"></div>
		</div>
	</div>
	<div id="admin_content">
		<div id="admin_navigator">
			<ul class="navigator">
				<li ><a href="/group/admin?group_id=<?php echo $group_id?>">小组设置</a></li>
				<li class="current"><a href="/group/admin?action=member&group_id=<?php echo $group_id?>">成员管理</a></li>
				<?php if ($group['join_type'] != 1) {?>
				<li><a href="/group/admin?action=member_verify&group_id=<?php echo $group_id?>">成员审核</a></li>
				<?php }?>
			</ul>
		</div>
		<div id="admin_body">
			<div class="margin_top15 margin_bottom10">
				<span class="bold">小组成员</span>
				<div class="clear"></div>
			</div>
			<form method="post" action="" id="groups-form">
			<table class="a_table">
				<tr>
					
					<th width="90">成员名称</th>
					<th width="50">角色</th>
					<th>操作</th>
				</tr>
				<?php if (!empty($members)) {?>
				<?php foreach($members as $member) { ?>
				<tr>
					<td><a href="/user/show?user_id=<?php echo $member['user_id'];?>"><?php echo $member['nickname'];?></a></td>
					<td style="text-align:left;"><?php echo $member['is_group_admin'] == 1 ? '管理员' : '成员'?></td>
					<td>
						<a href="/group/admin_op?action=delete&group_id=<?php echo $group_id?>&id=<?php echo $member['id'];?>">踢出</a>
						<?php if ($member['is_group_admin']) {?>
							<a href="/group/admin_op?action=removeadmin&group_id=<?php echo $group_id?>&id=<?php echo $member['id'];?>">取消管理员</a>
						<?php } else {?>
							<a href="/group/admin_op?action=toadmin&group_id=<?php echo $group_id?>&id=<?php echo $member['id'];?>">设为管理员</a>
						<?php }?>
					</td>
				</tr>
				<?php } ?>
				<?php }?>
			</table>
			</form>
		</div>
		<?php $this->load->view("common/page_controller");?>
		<div class="clear"></div>
		
	</div>
	<?php $this->load->view("common/footer");?>	
</div>
<?php $this->load->view("common/page_footer");?>